package com.hyf.translucentstatusbar.activity;

import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Bundle;

import com.hyf.translucentstatusbar.R;

public class TranslucentActivity extends Base {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_translucent);
        toolBar.setTitle("TranslucentActivity");
        setDisplayHomeAsUpEnabled();
    }

    @Override
    protected Drawable onHeaderBarDrawable() {
        int[] colors = {getResources().getColor(R.color.colorPrimary), getResources().getColor(R.color.colorPrimaryLight)};
        return new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, colors);
    }

    @Override
    protected boolean isImageHeader() {
        return false;
    }
}
